function addMemberDialog(
    {
        userId,
        callback = Function()
    }
) {
    if (!userId) {
        return $.toast("用户ID不能为空");
    }

    const $form = $(`
        <form class="mask-account" style="overflow: auto;max-height: 500px">
            <input type="hidden" name="userId" value="${userId}">
            <div style="margin: 0">
                <span class="mask-account-tit"><sub style="color: red;">*</sub>姓名</span>
                <span class="input-select"><input type="text" name="memberName" placeholder="请输入姓名" /></span>
            </div>
            <div>
                <span class="mask-account-tit">手机号</span>
                <span class="input-select"><input type="text" name="phone" placeholder="请输入手机号" /></span>
            </div>
            <div>
                <span class="mask-account-tit">邮箱</span>
                <span class="input-select"><input type="text" name="email" placeholder="请输入邮箱" /></span>
            </div>
            
            <div>
                <span class="mask-account-tit">生日</span>
                <span class="input-select">
                    <input type="text" name="birthdate" value="" placeholder="请选择生日" readonly/>
                    <i class="bi-chevron-down"></i>
                </span>
            </div>
            
            <div>
                <span class="mask-account-tit">性别</span>
                <span data-select="sex"></span>
            </div>
            
            <div>
                <span class="mask-account-tit">省市区</span>
                <input type="hidden" name="areaId"/>
                <span data-select="areaId"></span>
            </div>
            <div>
                <span class="mask-account-tit">详细地址</span>
                <span class="input-select"><input type="text" name="address" placeholder="请输入详细地址" /></span>
            </div>
           
        </form>
    `)

    laydate.render({
        elem: $form.find('input[name=birthdate]')[0],
        type: "date",
        max: moment().format("YYYY-MM-DD")
    });

    const $sexSel = $.getSelect("sex", [
        {name: "请选择", value: ""},
        {name: "男", value: 1},
        {name: "女", value: 2},
    ]);
    $form.find('[data-select="sex"]').replaceWith($sexSel);

    const $areaSel = $.getCitySelect({
        placeholder: "请选择所在城市",
        callback: ({areaId}) => {
            $form.find('[name=areaId]').val(areaId);
        }
    })
    $form.find('[data-select="areaId"]').replaceWith($areaSel);

    const $dialogWidget = $.dialog($form, {
        title: "新增成员",
        width: "600px",
        ok: () => {
            const data = $.getFormData($form);

            addMember(data, res => {
                const {Code, Message} = res;
                if (Code !== 10000) {
                    return $.toast(Message);
                }

                $dialogWidget.remove();
                $.toast("添加成功");
                callback();
            })

            return false;
        }
    })


    function addMember(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/Member/addMember"
        }, callback)
    }


}